package com.qdxwx.web.controller.search;

import com.qdxwx.web.controller.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import jakarta.servlet.http.HttpServletRequest;

/**
 * 前台 controller
 * @author developer
 */
@Controller
@RequestMapping("/search")
public class SearchController extends BaseController {

	private static final Logger logger = LoggerFactory.getLogger(SearchController.class);

	/**
	 * h5 搜索
	 */
	@RequestMapping("/h5.html")
	public String goH5Search(HttpServletRequest request) {
		try {
			String searchType = request.getParameter("searchType");
			request.setAttribute("searchType", searchType);
		} catch (Exception e) {
			logger.error("goH5Search", e);
			return toErrorView(request, e);
		}
		return getViewPathH5("search");
	}
}